package org.ms.mtx.core.annotation;


import java.lang.annotation.*;

/**
 * The Compensable Annotation of Transaction
 * <p>
 * Applicable to the starting point of the transaction.
 *
 * @author lry
 */
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Compensable {

    /**
     * The compensable name or id
     * <p>
     * The default value is the full path of the current method.
     *
     * @return transaction name or id
     */
    String value() default "";

    /**
     * The asynchronous cancel
     * <p>
     * The default value is false.
     *
     * @return asynchronous switch
     */
    boolean async() default false;

}
